!----------------------------------------------------------------------C 
! PURPOSE:                                                             C
!----------------------------------------------------------------------C
        SUBROUTINE OUTPUT(INDEX_FILE)
        USE BASIC_MOD
        IMPLICIT NONE
        INTEGER:: INDEX_FILE,I,J,N
        CHARACTER*4::   INDEX_NAME
        CHARACTER*8::   TITLE
	    WRITE(INDEX_NAME,'(I4.4)') INDEX_FILE
        TITLE="2D2D"//INDEX_NAME
      OPEN(99,FILE=TITLE//'.DAT')
      WRITE(99,*)'variables = X,Y,TT,DD,PP,UU,VV'
          WRITE(99,*)'zone i=',NI, ',  j=',NJ, ',DATAPACKING=BLOCK,& 
                     VARLOCATION=([3-7]=CELLCENTERED)'
          WRITE(99,*) ((X(I,J),I=1,NI),J=1,NJ)
          WRITE(99,*) ((Y(I,J),I=1,NI),J=1,NJ)
          WRITE(99,*) ((TT(I,J),I=1,NI-1),J=1,NJ-1)
          WRITE(99,*) ((DD(I,J),I=1,NI-1),J=1,NJ-1)
          WRITE(99,*) ((PP(I,J),I=1,NI-1),J=1,NJ-1)
          WRITE(99,*) ((UU(I,J),I=1,NI-1),J=1,NJ-1)
          WRITE(99,*) ((VV(I,J),I=1,NI-1),J=1,NJ-1)
      CLOSE(99)
      
      RETURN
      END SUBROUTINE